Receiver整合
    1) 启动zk
             ./bin/zkServer.sh start

    2) 启动kafka
            kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties

    3) 创建topic
            kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic kafka_streaming_topic

    4) 通过控制台测试本topic是否能够正常的生产和消费信息
            kafka-console-producer.sh --broker-list localhost:9092 --topic kafka_streaming_topic
            kafka-console-consumer.sh --zookeeper localhost:2181 --topic kafka_streaming_topic --from-beginning



spark-submit \
--class com.xiaoxu.KafkaReceiverWordCount \
--master local[2] \
--name KafkaReceiverWordCount \
--packages org.apache.spark:spark-streaming-kafka-0-8_2.11:2.2.0 \
/home/hadoop/lib/*.jar  hadoop000:2181 test kafka_streaming_topic 1


spark-submit \
--class com.xiaoxu.KafkaDirectWordCount \
--master local[2] \
--name KafkaDirectWordCount \
--packages org.apache.spark:spark-streaming-kafka-0-8_2.11:2.2.0 \
/home/hadoop/lib/*.jar  hadoop000:9092 kafka_streaming_topic

